#ifndef ABSTRACT_WIDGET_PRIVATE_H
#define ABSTRACT_WIDGET_PRIVATE_H
#include <qboxlayout.h>
#include <qlabel.h>
#include "WidgetFrameLess.h"
#include "PushButton.h"

class WidgetFrameLessPrivate : public QObject
{
	Q_OBJECT
	DECLARE_PUBLIC(WidgetFrameLess)
public:
	WidgetFrameLessPrivate(WidgetFrameLess* parent = nullptr);
	~WidgetFrameLessPrivate();

	bool underMouse();
public slots:
	void setTitle(const QString& title);
protected:
	void init();
	void setTitleWidgetStyle();
private:
	QWidget* titleWidget = nullptr;
	QVBoxLayout* layout = nullptr;

	QPoint movePoint;
	bool   mousePress = false;
	QLabel* titleLabel = nullptr;
	PushButton* closeButton;
};

#endif